﻿package org.openChart.display 
{
	import flash.display.Sprite;
	import flash.geom.Point;
	import org.openChart.meta.BaseChart;
	import org.openChart.meta.BaseObject;
	import org.openChart.util.Rectangle;
	
	/**
	 * ...
	 * @author Chongyuan
	 */
	public class DisplayBaseObject implements DisplayInterface
	{
		private var position_:Point = new Point();
		
		private var color_:uint;
		private var alpha_:Number;
		private var selectedColor_:uint;
		private var selectedAlpha_:Number;
		
		private var dataModel_:BaseObject;
		
		public function DisplayBaseObject( object:BaseObject ) 
		{
			dataModel_ = object;
			if (object)
			{
				this.color_ = object.getStyle().color;
				this.alpha_ = object.getStyle().alpha;
				this.selectedAlpha_ = object.getStyle().selectedAlpha;
				this.selectedColor_ = object.getStyle().selectedColor;
			}
			this.position_ = new Point();
		}
		
		public function initialize():void
		{
			
		}
		
		public function resize(rectangle:Rectangle):void
		{
			
		}
		
		public function set position( position_:Point ):void
		{
			this.position_ = position_;
		}
		
		public function get position():Point
		{
			return this.position_;
		}
		
		public function set color( color_:uint ):void
		{
			this.color_ = color_;
		}
		
		public function get color():uint
		{
			return this.color_;
		}
		
		public function set alpha( alpha_:Number ):void
		{
			this.alpha_ = alpha_;
		}
		
		public function get alpha():Number
		{
			return this.alpha_;
		}
		
		public function set selectedColor( selectedColor_:uint ):void
		{
			this.selectedColor_ = selectedColor_;
		}
		
		public function get selectedColor():uint
		{
			return this.selectedColor_;
		}
		
		public function set selectedAlpha( selectedAlpha_:Number ):void
		{
			this.selectedAlpha_ = selectedAlpha_;
		}
		
		public function get selectedAlpha():Number
		{
			return this.selectedAlpha_;
		}
		
		public function get dataModel():BaseObject
		{
			return dataModel_;
		}
	}
	
}